import request from "../utils/request";

// 用户登录
export const userLogin = data => {
    return request({
        method: 'POST',
        url:'/user/backgroundLogin',
        data
    })
}
// 注销
export const quitLogin = () => {
    return request({
        method: 'GET',
        url: '/user/logout'
    })
}
//教师数据非分页
export const teacherList = () => {
    return request({
        method: 'GET',
        url:'/user/getTeacherList'
    })
}
//教师/学生列表
export const userList = data => {
    return request({
        method: 'POST',
        url:'/user/findUserPage',
        data
    })
}
//添加学生账户
export const addStudent = data => {
    return request({
        method: 'POST',
        url:'/user/addStudent',
        data
    })
}
//编辑学生账户
export const editStudent = data => {
    return request({
        method: 'POST',
        url:'/user/editStudent',
        data
    })
}
//删除学生/教师账户
export const dleUser = userId => {
    return request({
        method: 'GET',
        url:'/user/deleteUser?userId=' + userId,
    })
}
//添加教师账户
export const addTeacher = data => {
    return request({
        method: 'POST',
        url:'/user/addTeacher',
        data
    })
}
//添加教师账户
export const editTeacher = data => {
    return request({
        method: 'POST',
        url:'/user/editTeacher',
        data
    })
}
